package com.ruoyi.womp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.womp.mapper.WompWeighingApparatusTypeMapper;
import com.ruoyi.womp.domain.WompWeighingApparatusType;
import com.ruoyi.womp.service.IWompWeighingApparatusTypeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 衡器类型列表Service业务层处理
 * 
 * @author mzz
 * @date 2022-04-14
 */
@Service
public class WompWeighingApparatusTypeServiceImpl implements IWompWeighingApparatusTypeService 
{
    @Autowired
    private WompWeighingApparatusTypeMapper wompWeighingApparatusTypeMapper;

    /**
     * 查询衡器类型列表
     * 
     * @param id 衡器类型列表主键
     * @return 衡器类型列表
     */
    @Override
    public WompWeighingApparatusType selectWompWeighingApparatusTypeById(Integer id)
    {
        return wompWeighingApparatusTypeMapper.selectWompWeighingApparatusTypeById(id);
    }

    /**
     * 查询衡器类型列表列表
     * 
     * @param wompWeighingApparatusType 衡器类型列表
     * @return 衡器类型列表
     */
    @Override
    public List<WompWeighingApparatusType> selectWompWeighingApparatusTypeList(WompWeighingApparatusType wompWeighingApparatusType)
    {
        return wompWeighingApparatusTypeMapper.selectWompWeighingApparatusTypeList(wompWeighingApparatusType);
    }

    /**
     * 新增衡器类型列表
     * 
     * @param wompWeighingApparatusType 衡器类型列表
     * @return 结果
     */
    @Override
    public int insertWompWeighingApparatusType(WompWeighingApparatusType wompWeighingApparatusType)
    {
        wompWeighingApparatusType.setCreateTime(DateUtils.getNowDate());
        return wompWeighingApparatusTypeMapper.insertWompWeighingApparatusType(wompWeighingApparatusType);
    }

    /**
     * 修改衡器类型列表
     * 
     * @param wompWeighingApparatusType 衡器类型列表
     * @return 结果
     */
    @Override
    public int updateWompWeighingApparatusType(WompWeighingApparatusType wompWeighingApparatusType)
    {
        wompWeighingApparatusType.setUpdateTime(DateUtils.getNowDate());
        return wompWeighingApparatusTypeMapper.updateWompWeighingApparatusType(wompWeighingApparatusType);
    }

    /**
     * 批量删除衡器类型列表
     * 
     * @param ids 需要删除的衡器类型列表主键
     * @return 结果
     */
    @Override
    public int deleteWompWeighingApparatusTypeByIds(String ids)
    {
        return wompWeighingApparatusTypeMapper.deleteWompWeighingApparatusTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除衡器类型列表信息
     * 
     * @param id 衡器类型列表主键
     * @return 结果
     */
    @Override
    public int deleteWompWeighingApparatusTypeById(Integer id)
    {
        return wompWeighingApparatusTypeMapper.deleteWompWeighingApparatusTypeById(id);
    }
}
